package com.aconcagua.samples.modules.simpleModule.controller.commands
{
	import com.aconcagua.samples.modules.shell.controller.gestures.AddMessageToModuleGesture;
	import com.aconcagua.samples.modules.simpleModule.state.ModuleApplicationState;
	
    public class AddMessageToModuleCommand 
    {
		private var _moduleApplicationState:ModuleApplicationState;
		
		public function AddMessageToModuleCommand(moduleApplicationState:ModuleApplicationState):void {
			this._moduleApplicationState = moduleApplicationState;
		}
		
        public function execute(addMessageToModuleGesture:AddMessageToModuleGesture):void {
        	trace("Executing addMessageToModuleGesture");
        	_moduleApplicationState.addMessage(addMessageToModuleGesture.message);
        }        
    }
}